package com.ticket.sass.admin.dto.output.order;

import com.ticket.sass.common.entity.tenant.OrderCardRechargeEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author ywb
 * @date 2024-03-14 11:16
 */
@Data
@ApiModel
public class OrderCardRechargesListOutput {
    @ApiModelProperty(value = "订单号")
    private Long id;
    
    @ApiModelProperty(value = "订单号")
    private String orderNo;
    
    @ApiModelProperty(value = "用户ID")
    private Long userId;
    
    @ApiModelProperty(value = "用户名")
    private String username;
    
    @ApiModelProperty(value = "手机号")
    private String cellphone;
    
    @ApiModelProperty(value = "会员卡 id")
    private Long cardId;
    
    @ApiModelProperty(value = "卡号")
    private String cardNumber;
    
    @ApiModelProperty(value = "支付类型：1 微信，2 支付宝，3 会员卡")
    private Integer payType;
    
    @ApiModelProperty(value = "支付状态：0 未支付，1 支付中，2 已支付，3 支付失败，4 已退款")
    private Integer payStatus;
    
    @ApiModelProperty(value = "支付价格")
    private BigDecimal payPrice;
    
    @ApiModelProperty(value = "支付时间")
    private LocalDateTime payTime;
    
    @ApiModelProperty(value = "充值金额")
    private BigDecimal rechargeAmount;
    
    @ApiModelProperty(value = "下单时间")
    public LocalDateTime createdAt;
    
    
    public OrderCardRechargesListOutput() {
    }
    
    public OrderCardRechargesListOutput(OrderCardRechargeEntity entity) {
        this.id = entity.getId();
        this.userId = entity.getUserId();
        this.orderNo = entity.getOrderNo();
        this.cardId = entity.getCardId();
        this.rechargeAmount = entity.getRechargeAmount();
        this.payPrice = entity.getPayPrice();
        this.payType = entity.getPayType();
        this.payStatus = entity.getPayStatus();
        this.payTime = entity.getPayTime();
        this.createdAt = entity.getOrderCreatedAt();
    }
}
